package rnavigator.model;

import java.awt.geom.Arc2D;

/**
 *
 * @author Elias la Cour
 * 
 * =====UnitCircleArc=====
 * Class contains variables for Arc2D.setArcByCenter()
 * Necessary in order to scale up arcs.
 * Another more elegant solution could be to implement a new drawArcmethod.
 */

public class UnitCircleArc {

    private Arc2D arc;
    private double x;
    private double y;
    private double radius;
    private double angSt;
    private double angExt;
    private double p1x,p1y,p2x,p2y,p3x,p3y;
    private int closure;

    public UnitCircleArc() {
    }

    public UnitCircleArc(double x, double y, double radius, double angSt, double angExt, int closure) {
        this.x = x;
        this.y = y;
        this.radius = radius;
        this.angSt = angSt;
        this.angExt = angExt;
        this.closure = closure;
    }

    public Arc2D getArc2D() {
        setArc(new Arc2D.Double());
        getArc().setArcByCenter(getX(), getY(), getRadius(), getAngSt(), getAngExt(), getClosure());
        return getArc();
    }

    /**
     * @return the arc
     */
    public Arc2D getArc() {
        return arc;
    }

    /**
     * @param arc the arc to set
     */
    public void setArc(Arc2D arc) {
        this.arc = arc;
    }

    /**
     * @return the x
     */
    public double getX() {
        return x;
    }

    /**
     * @param x the x to set
     */
    public void setX(double x) {
        this.x = x;
    }

    /**
     * @return the y
     */
    public double getY() {
        return y;
    }

    /**
     * @param y the y to set
     */
    public void setY(double y) {
        this.y = y;
    }

    /**
     * @return the radius
     */
    public double getRadius() {
        return radius;
    }

    /**
     * @param radius the radius to set
     */
    public void setRadius(double radius) {
        this.radius = radius;
    }

    /**
     * @return the angSt
     */
    public double getAngSt() {
        return angSt;
    }

    /**
     * @param angSt the angSt to set
     */
    public void setAngSt(double angSt) {
        this.angSt = angSt;
    }

    /**
     * @return the angExt
     */
    public double getAngExt() {
        return angExt;
    }

    /**
     * @param angExt the angExt to set
     */
    public void setAngExt(double angExt) {
        this.angExt = angExt;
    }

    /**
     * @return the closure
     */
    public int getClosure() {
        return closure;
    }

    /**
     * @param closure the closure to set
     */
    public void setClosure(int closure) {
        this.closure = closure;
    }
}
